package pl.edu.mimuw.irs.rcp.controller.editor.workflow.command;

import pl.edu.mimuw.irs.core.model.design.net.IRSNode;

public class ExpandCommand extends IRSNodeCommand {

	// *** Attributes

	private boolean expand;
	
	// *** Constructors

	public ExpandCommand(IRSNode node, boolean expand) {
		super(node);
		this.expand = expand;
	}
	
	// *** Methods

	@Override
	public void performExecute() {
		getNode().setExpanded(expand);
	}
	
	@Override
	public void performUndo() {
		getNode().setExpanded(!expand);
	}
}
